﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Package;
using Microsoft.VisualStudio.TextManager.Interop;
using Microsoft.VisualStudio.OLE.Interop;

namespace Microsoft.latex_env
{
    class LatexService : LanguageService 
    {
        private LanguagePreferences m_preferences;
        private texScanner m_scanner;

        public override string GetFormatFilterList()
        {
            throw new NotImplementedException();
        }

        public override LanguagePreferences GetLanguagePreferences()
        {

            if (m_preferences == null)
            {
                m_preferences = new LanguagePreferences(this.Site,
                                                        typeof(LatexService).GUID,
                                                        this.Name );
                m_preferences.Init();
            }
            return m_preferences;
        }

        public override IScanner GetScanner(IVsTextLines buffer)
        {
            // throw new NotImplementedException();
            if (m_scanner == null)
            {
                m_scanner = new texScanner();
            }
            return m_scanner;
        }

        public override string Name
        {
            get { throw new NotImplementedException(); }
        }

        public override AuthoringScope ParseSource(ParseRequest req)
        {
            throw new NotImplementedException();
        }
    }
}
